using System;
using System.Data;
using System.Xml;
using OR.Reuse.Persistence;

namespace OR.Lazarus.Library.DataTier.Compiled
{
    public class ResultDetail : OR.Lazarus.Library.DataTier.Compiled.Lazarus.ResultDetail
    {
        private bool mIsForeignKey;

        public bool IsForeignKey
        {
            get { return mIsForeignKey; }
            set { mIsForeignKey = value; }
        }

        public override void LoadXml(XmlElement pSource)
        {
            base.LoadXml(pSource);

            mIsForeignKey = DataUtility.GetBool(pSource, "isfk", false);
        }

        public override XmlElement SaveXml(XmlDocument p_docContext)
        {
            XmlElement vReturn = base.SaveXml(p_docContext);

            vReturn.SetAttribute("isfk", mIsForeignKey.ToString());

            return (vReturn);
        }
    }
}
